/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package Graph;

import java.util.Objects;

/**
 *
 * @author 江南才俊周涛涛
 */
public class Car {

    public int name;
    public double dis;//到活跃点距离
    public double query_dis;//到查询点距离
    public int to_name;//是往to_name开的车

    public Car(int name) {
        this.name = name;
    }

    public Car(Car c) {
        this.name = c.name;
        this.dis = c.dis;
    }

    public boolean equals(Object temp) {
        if (temp == this) {
            return true;
        }
        if (!(temp instanceof Car)) {
            return false;
        }
        Car c = (Car) temp;
        return name == c.name;
    }

    public int hashCode() {
        return Objects.hash(name);
    }

}
